// 文件操作工具
#ifndef FILE_MANAGE_H
#define FILE_MANAGE_H

#include <stdio.h>
#include "LinkedList.h"

// 指定路径，打开文件
FILE *FileOpen(char *filepath);

// 文件写入
int FileWrite(FILE *filePointer, ListPointer nodeHead, int size, int startPosition);

// 文件读取
ListPointer FileRead(FILE *filePointer, int size);

// 文件更新
void FileUpdate(FILE *filePointer, ListPointer nodeHead, int size, int (*pointerUpdate)(ListPointer));

// 假删除
void FileRemove(FILE *filePointer, ListPointer nodeHead, int size, int (*pointerRemove)(ListPointer));

// 真删除
void FileDelete(FILE *filePointer, char filePath[], ListPointer nodeHead, int size, int (*pointerDelete)(ListPointer));

// 文件数据添加
void FileAdd(FILE *filePointer, ListPointer nodeHead, int size, void *(*pstr)(void *data));

#endif